checkbutton: Claim sequence on release instead of press
authorAlexander Mikhaylenko <alexm@gnome.org>
Fri, 25 Dec 2020 10:59:38 +0000 (15:59 +0500)
committerAlexander Mikhaylenko <alexm@gnome.org>
Fri, 29 Jan 2021 07:00:10 +0000 (12:00 +0500)
Make it possible to drag windows from check buttons in future.

gtk/gtkcheckbutton.c

index afadecd8411f80ca416f839cfcee66dcb7161f9a..0ce5d1ae0f4f76a3678e361168e7fc744d743083 100644 (file)
@@ -278,8 +278,6 @@ click_pressed_cb (GtkGestureClick *gesture,
 {
   if (gtk_widget_get_focus_on_click (widget) && !gtk_widget_has_focus (widget))
     gtk_widget_grab_focus (widget);
-
-  gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
 }
 
 static void
@@ -295,6 +293,8 @@ click_released_cb (GtkGestureClick *gesture,
   if (priv->active && (priv->group_prev || priv->group_next))
     return;
 
+  gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+
   gtk_check_button_set_active (self, !priv->active);
 
   if (priv->action_helper)